import tester.cobertura.Instrument;


// to represent an image
@Instrument
class Image implements IsSame<Image>, IValue<Image>, MakeString<Image>/*, ISelectable<Image>*/{
	String title;
	String fileType;
	int fileSize;  // in bytes
	
	Image(String title, String fileType, int fileSize){
		this.title = title;
		this.fileType = fileType;
		this.fileSize = fileSize;
	}
	
	/* TEMPLATE
	 * ... this.title ...       -- String
	 * ... this.fileType ...    -- String
	 * ... this.fileSize ...    -- int
	 * 
	 * ... this.size() ...        -- boolean
	 * ... this.isSame(Image) ... -- boolean
	 */
	
	// compute the value of this song - determined by its file size
	@Override
	public int value(){
		return this.fileSize;
	}


	// is this image the same as the given image?
	@Override
	public boolean isSame(Image that){
		return this.title.equals(that.title) &&
		       this.fileType.equals(that.fileType) &&
		       this.fileSize == that.fileSize;
	}

	// a method to covert types to a string representation.
	@Override
	public String makeString(){
		return this.title + "-" + this.fileType + "-" + Integer.toString(this.fileSize);
	}

	/*
	// ...
	@Override
	public boolean pick() {
		// TODO Auto-generated method stub
		return false;
	}
	*/
}